import request from '@/utils/request'

export function getpermissions(params) {
    return request({
        url: '/permissions',
        method: 'get',
        params
    })
}

export function addpermissions(data) {
    return request({
        url: '/permissions',
        method: 'POST',
        data
    })
}

export function getmenus(params) {
    return request({
        url: '/menus',
        method: 'get',
        params
    })
}


export function delpermissions(id) {
    return request({
        url: `/permissions/${id}`,
        method: 'delete'
    })
}

export function datapermissions(data) {
    return request({
        url: `/permissions/${data.id}`,
        method: 'put',
        data
    })
}

export function getperm(data) {
    return request({
        url: `/permissions/${data.id}`,
        method: 'get',
    })
}